package nl.tue.be.ds.duraark.bSDD.dump;

import nl.tue.be.ds.duraark.bSDD.ClientUtilities;
import nl.tue.be.ds.duraark.bSDD.DataBaseUtilities;

public class Launcher {

	
	public static void main(String[] args) {
		
		final String databaseName = "bSDDdump.db";
		int sum;
	
		ClientUtilities.login();
		DataBaseUtilities.setupDatabase(databaseName);
		
		ConSearchProcessor conSearchProcessor = new ConSearchProcessor();
		
		do {
			sum = conSearchProcessor.searchPerTerm();
			System.out.println(sum + " concepts have been dumped into database after concept searching");
		} while (sum != 0);
		
		ConInRelSearchProcessor conInRelSearchProcessor = new ConInRelSearchProcessor();
		
		do {
			sum = conInRelSearchProcessor.searchProcess();
			System.out.println(sum + " concepts in relationship have been dumped into database after concept in relationships searching");
		} while (sum !=0);
		
		ClientUtilities.logout();
		DataBaseUtilities.db.close();
		

	}

}
